import Service from './$axios'
import { appName } from '../config';

// 查询工单批号列表[1]
export const findPlanAll = (data) => {
    return Service({
        url: `${appName}/workOrder/findPlanAll`,
        method: 'post',
        data: data
    })
}

// 查询特供机信息管理[19]
export const findSpecialProvision = (data) => {
    return Service({
        url: `${appName}/workOrder/findSpecialProvision`,
        method: 'post',
        data: data
    })
}


// /workOrder/addSpecialProvision
// 新增特供机信息[20]
export const addSpecialProvision = (data) => {
    return Service({
        url: `${appName}/workOrder/addSpecialProvision`,
        method: 'post',
        data: data
    })
}


// /workOrder/updateSpecialProvision
// 修改特供机信息[21]
export const updateSpecialProvision = (data) => {
    return Service({
        url: `${appName}/workOrder/updateSpecialProvision`,
        method: 'post',
        data: data
    })
}


// /workOrder/addSpecialPicture
// 特供机信息图片上传[22]
export const addSpecialPicture = (data) => {
    return Service({
        url: `${appName}/workOrder/addSpecialPicture`,
        method: 'post',
        data: data
    })
}


// /workOrder/findOrderNoSpecialPicture
// 根据顺序号查询特供机信息图片[23]
export const findOrderNoSpecialPicture = (data) => {
    return Service({
        url: `${appName}/workOrder/findOrderNoSpecialPicture?${data}`,
        method: 'get'
    })
}


// /workOrder/deleteSpecialProvision
// 根据特供ID删除特供机信息[24]
export const deleteSpecialProvision = (data) => {
    return Service({
        url: `${appName}/workOrder/deleteSpecialProvision`,
        method: 'post',
        data: data
    })
}

// /workOrder/deleteSpecialPicture
// 根据picture_id删除特供机图片[25]
export const deleteSpecialPicture = (data) => {
    return Service({
        url: `${appName}/workOrder/deleteSpecialPicture`,
        method: 'post',
        data: data
    })
}

// -------------- yyr --------------
// 查询
export const querySpecialOfferManage = (data) => {
    return Service({
        url: `${appName}/specialOfferInformationManage/querySpecialOfferManage?${data}`,
        method: 'get'
    })
}
// 新增
export const insertSpecialOfferManage = (data) => {
    return Service({
        url: `${appName}/specialOfferInformationManage/insertSpecialOfferManage`,
        method: 'post',
        data
    })
}
// 修改
export const editSpecialOfferInformation = (data) => {
    return Service({
        url: `${appName}/specialOfferInformationManage/editSpecialOfferInformation`,
        method: 'post',
        data
    })
}
// 导出
export const exportSpecialOfferInformationManageExcel = (data) => {
    return Service({
        url: `${appName}/specialOfferInformationManage/exportSpecialOfferInformationManageExcel`,
        method: 'post',
        data: data,
        responseType: 'blob'

    })
}
// 上传图片(新增)
export const uploadFileInsert = (data) => {
    return Service({
        url: `${appName}/specialOfferInformationManage/uploadFileInsert`,
        method: 'post',
        data
    })
}
// 上传图片(修改)
export const uploadFileEdit = (data) => {
    return Service({
        url: `${appName}/specialOfferInformationManage/uploadFileEdit`,
        method: 'post',
        data
    })
}
// 删除
export const deleteSpecialOfferManage = (data) => {
    return Service({
        url: `${appName}/specialOfferInformationManage/deleteSpecialOfferManage`,
        method: 'delete',
        data
    })
}